package ru.amse.tsyganov.jumleditor.graphicaleditor.activity;

import ru.amse.tsyganov.jumleditor.graphicaleditor.GraphicalEditor;
import ru.amse.tsyganov.jumleditor.graphicaleditor.common.AddStateMode;
import ru.amse.tsyganov.jumleditor.model.activity.ForkJoinState;
import ru.amse.tsyganov.jumleditor.model.common.State;
import ru.amse.tsyganov.jumleditor.view.activity.ForkJoinStateView;
import ru.amse.tsyganov.jumleditor.view.common.StateView;

public class AddForkJoinStateMode extends AddStateMode {

	public AddForkJoinStateMode(GraphicalEditor graphicalEditor) {
		super(graphicalEditor);
	}

	@Override
	public StateView<? extends State> createNewState() {
		ForkJoinState state = new ForkJoinState();
		StateView<? extends State> newStateView = 
			new ForkJoinStateView<ForkJoinState>(state, getEditor().getActivityGraphView());
		
		return newStateView;
	}

}
